package one.to.one.cas1;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Embeddable;

@Embeddable
public class Adresse implements Serializable {

	private static final long serialVersionUID = 3589396131121119206L;

	@Column(length = 30, nullable = false)
	private String adr1;

	@Column(length = 30)
	private String adr2;

	@Column(length = 30)
	private String adr3;

	@Column(length = 5, nullable = false)
	private String codePostal;

	@Column(length = 20, nullable = false)
	private String ville;

	@Column(length = 3)
	private String cedex;

	@Column(length = 20, nullable = false)
	private String pays;

	public Adresse() {
	}

	public Adresse(String adr1, String adr2, String adr3, String codePostal,
			String ville, String cedex, String pays) {
		this.adr1 = adr1;
		this.adr2 = adr2;
		this.adr3 = adr3;
		this.codePostal = codePostal;
		this.ville = ville;
		this.cedex = cedex;
		this.pays = pays;
	}

	@Override
	public String toString() {
		return "Adresse [adr1=" + adr1 + ", adr2=" + adr2 + ", adr3=" + adr3
				+ ", codePostal=" + codePostal + ", ville=" + ville
				+ ", cedex=" + cedex + ", pays=" + pays + "]";
	}
}